package common_enum

// 公共-车牌颜色
type licensePlateColor int

var LicensePlateColor licensePlateColor

// 蓝
func (c *licensePlateColor) Blue() int {
	return 1
}

// 黄
func (c *licensePlateColor) Yellow() int {
	return 2
}

// 黑
func (c *licensePlateColor) Black() int {
	return 3
}

// 白
func (c *licensePlateColor) White() int {
	return 4
}

// 绿
func (c *licensePlateColor) Green() int {
	return 5
}

// 黄绿
func (c *licensePlateColor) YellowAndGreen() int {
	return 224
}

func (c *licensePlateColor) ToText(value int) string {
	switch value {

	case 1:
		return "蓝"

	case 2:
		return "黄"

	case 3:
		return "黑"

	case 4:
		return "白"

	case 5:
		return "绿"

	case 224:
		return "黄绿"

	}
	return ""
}

func (c *licensePlateColor) ToValue(text string) int {
	switch text {

	case "蓝":
		return 1

	case "黄":
		return 2

	case "黑":
		return 3

	case "白":
		return 4

	case "绿":
		return 5

	case "黄绿":
		return 224

	}
	return 0
}
